<h3>1. Definition</h3>
<p>
  Given a random vector \(X_1,X_2,...,X_p\), its marginal cumulative distribution functions (CDFs) are \(F_i(x) = P[X_i \leq x]\). By applying the probability integral transform to each component, the marginal distributions of \((U_1,U_2,...,U_p) = (F_1(X_1),F_2(X_2),...,F_p(X_p))\) are uniform (from <a href="https://en.wikipedia.org/wiki/Copula_(probability_theory)">Wikipedia</a>). Then the copula of \(X_1,X_2,...,X_p\) is defined as the joint cumulative distribution function of \(U_1,U_2,...,U_p\), for which the marginal distribution of each variable U is uniform as  \(U(0,1)\).
</p>

\[C(u_1,u_2,...,u_p) = P[U_1\leq u_1,U_2\leq u_2,..., U_1\leq u_1]\]

<p>
  Copulas function contains all the dependency characteristics of the marginal distributions and will better describe the linear and non-linear relationship between variables, using probability. They allow the marginal distributions to be modeled independently from each other, and no assumption on the joint behavior of the marginals is required.
</p>

<h3>2. Bivariate Copulas</h3>
<p>
  Since this research focuses on bivariate copulas (for pairs trading we have 2 random variables) some probabilistic properties are specified.
  Let X and Y be two random variables with cumulative probability function \(F_1(X)\) and \(F_2(Y)\). \(U=F_1(X), V=F_2(Y)\) which are uniformly distributed.  Then the copula function is \(C(u,v)=P(U\leq u,V\leq v)\). Taking the partial derivative of the copula function over U and V would give the conditional distribution function as follows:
</p>

\[P(U\leq u\mid V= v)=\frac{\partial C(u,v)}{\partial v}\]
\[P(V\leq v\mid U= u)=\frac{\partial C(u,v)}{\partial u}\]

<h3>3. Archimedean Copulas</h3>
<p>
  There are many copula functions that enable us to describe dependence structures between variables, other than the Gaussian assumption. Here we will focus three of these; the <em>Clayton</em>, <em>Gumbel</em> and <em>Frank</em> copula formulas from the Archimedean class.
  Archimedean copulas are based on the Laplace transforms φ of univariate distribution functions. They are constructed by a particular generator function \(\phi\).
</p>

\[C(u,v)=\phi^{-1}( \phi(u),\phi(v) )\]

<p>
  The probability density function is:
</p>

\[c(u,v)=\phi_{(2)}^{-1}(\phi(u)+\phi(v))\phi^{'}(u)\phi^{'}(v)\]

<p>
  Where \(\phi_{(2)}^{-1}\) is the inverse of the second derivative of the generator function.
</p>

<table class="table qc-table">
<thead>
<tr>
<th style="text-align: left;">Copula</th>
<th style="text-align: center;">Copula function C(u,v;θ)</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">Clayton Copula</td>
<td style="text-align: left;">\[(u^{-\theta}+v^{-\theta}-1)^{-1/\theta}\]</td>
</tr>
<tr>
<td style="text-align: left;">Gumbel Copula</td>
<td style="text-align: left;">\[exp(-[(-\ln u)^{\theta}＋(-\ln v)^{\theta}]^{1/\theta})\]</td>
</tr>
<tr>
<td style="text-align: left;">Frank Copula</td>
<td>\[-\theta^{-1}\ln\left[1+\frac{(exp(-\theta u)-1)(exp(-\theta v)-1)}{exp(-\theta)-1}\right]\]</td>
</tr>
</tbody>
</table>


<p>
  Genest and MacKay proved that the relation between the copula generator function and Kendall rank correlation tau in the bivariate case can be given by:
</p>

\[\tau=1+4\int_{0}^{1} \frac{\partial \phi (v)}{\partial \phi^{'}(v)}dv\]

<p>
  So we can easily estimate the parameter in Archimedean copulas if we know Kendall’s tau rank measure and the generator function. Please refer to step 3 to see the formulas.
</p>
